{block name="circle_layout"}
	{include file="common:common_layout"}
{/block}
{extend name="common/layout" /}
{block name="style"}{/block}
{block name="content"}
<div class="group warp-all">
    {include file="circle:group:group_top" /}
    
    <div class="base-layout mt20">
        <div class="mainbox">
            <div class="base-tab-menu">
                <ul class="base-tabs-nav">
                    <li><a href="{:url('circle/group/index')}?c_id=<?php echo $c_id;?>">话题</a></li>
                    <li><a href="{:url('circle/group/group_member')}?c_id=<?php echo $c_id;?>">圈友</a></li>
                    <li class="selected"><a href="{:url('circle/group/group_goods')}?c_id=<?php echo $c_id;?>">商品</a></li>
                </ul>
            </div>
            <div class="group-share-goods">
                <?php if(!empty($goods_list)){?>
                <ul class="share-goods-pinterest" id="groupPinterest">
                    <?php foreach(($goods_list) as $val){?>
                    <li class="item">
                        <div class="share-goods-pic thumb"><a href="<?php echo url('shop/Goods/index', array('goods_id'=>$val['snsgoods_goodsid']));?>" target="_blank" title="<?php echo $val['snsgoods_goodsname'];?>"><img alt="<?php echo $val['snsgoods_goodsname'];?>" title="<?php echo $val['snsgoods_goodsname'];?>" src="<?php echo cthumb($val['snsgoods_goodsimage'], 240, $val['snsgoods_storeid']);?>"></a></div>
                        <dl class="share-describe">
                            <dt class="member-avatar-s"><img src="<?php echo $val['member_avatar'];?>" /></dt>
                            <dd class="member-name">
                                <h4><a href="javascript:void(0);"><?php echo $val['share_membername'];?></a></h4>
                                <h5 class="share-date"><?php echo 于;?>
                                    <?php if($val['share_isshare'] == 1){?>
                                    <em><?php echo @date('Y-m-d H:i', $val['share_addtime']);?></em><?php echo 显示;?>
                                    <?php }else{?>
                                    <em><?php echo @date('Y-m-d H:i', $val['share_likeaddtime']);?></em><?php echo 喜欢;?>
                                    <?php }?>
                                </h5>
                            </dd>
                            <dd class="share-content"><i></i>
                                <p>
                                    <?php if($val['share_content'] != ''){echo $val['share_content'];}else{echo 赞！我很喜欢这件商品。;}?>
                                </p>
                                <?php if(isset($pic_list[$val['share_id']])){?>
                                <ul class="ap-pics">
                                    <li class="case"></li>
                                    <?php foreach($pic_list[$val['share_id']] as $v){?>
                                    <li><span class="thumb"><a href="JavaScript:void(0);"><img src="<?php echo showImgUrl($v);?>" class="t-img" /></a></span></li>
                                    <?php }?>
                                </ul>
                                <?php }?>
                                <div class="clear">&nbsp;</div>
                            </dd>
                        </dl>
                        <div class="share-ops"> <span class="ops-like" id="likestat_<?php echo $val['share_goodsid'];?>" title="喜欢"> <a href="javascript:void(0);" nc_type="likebtn" data-param='{"gid":"<?php echo $val['share_goodsid'];?>"}' class="<?php echo $val['snsgoods_havelike']==1?'noaction':''; ?>"><i class="<?php echo $val['snsgoods_havelike']==1?'noaction':''; ?>"></i><?php echo 喜欢;?></a> <em nc_type="likecount_<?php echo $val['share_goodsid'];?>"><?php echo $val['snsgoods_likenum'];?></em> </span> <span class="ops-comment" title="<?php echo 评论;?>"><a href="javascript:void(0)"><i></i></a><em><?php echo $val['share_commentcount'];?></em></span></div>
                        <div class="clear"></div>
                    </li>
                    <?php }?>
                </ul>
                <div class="clear"></div>
                <div class="pagination"><?php echo $show_page;?></div>
                <?php }else{?>
                <div class="no-goods"><span><i></i><?php echo 很遗憾，尚无圈友分享过商品。;?></span></div>
                <?php }?>
            </div>
        </div>
        {include file="circle:group:group_sidebar" /}

    </div>
</div>
<script src="__SITE_RESOURCE__/js/jquery.masonry.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function(){
        var $container = $('#groupPinterest');
        // initialize
        $container.masonry({
            itemSelector: '.item'
        });
        var msnry = $container.data('masonry');

        //喜欢操作
        $("a[nc_type='likebtn']").live('click',function(){
            var obj = $(this);
            var data_str = $(this).attr('data-param');
            eval( "data_str = "+data_str);
            ajaxget("<?php echo url('member/snsindex/editlike');?>?inajax=1&id="+data_str.gid);
        });

//横高局中比例缩放隐藏显示图片
        $(".ap-pics .t-img").VMiddleImg({"width":30,"height":30});

    });
</script>
{/block}